#include <pthread.h>
#include <stddef.h>

class Locker
{
    public:
        Locker(){ pthread_mutex_init(&mutex, NULL); }
        ~Locker(){ pthread_mutex_destroy(&mutex);}

        void Lock(){ pthread_mutex_lock(&mutex); }
        void UnLock(){ pthread_mutex_unlock(&mutex); }
    private:
        pthread_mutex_t mutex;
};
